using System;
namespace AppToolKit.Model.Validation.Validator
{
	public class DefalutValidator : IValidator
	{
		protected ValidateCallback callback_;
		protected string triggerKey_;
		protected ValidateBehavior behavior_;
		public string TriggerKey
		{
			get
			{
				return this.triggerKey_;
			}
			set
			{
				this.triggerKey_ = value;
			}
		}
		public ValidateBehavior Behavior
		{
			get
			{
				return this.behavior_;
			}
			set
			{
				this.behavior_ = value;
			}
		}
		public void Template(ValidateCallback callback)
		{
			this.callback_ = callback;
		}
		public virtual ValidateResult Validate(ValidateContext context)
		{
			return this.callback_(context);
		}
	}
}
